<template>
  <div id="alldetailsListlist"> 
          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">

                <el-table-column label="时间"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.createtime }}</span>
                    </template>
                </el-table-column> 
                <el-table-column :label="variable_name1 + '价格'"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.kmbnumber }}</span>
                    </template>
                </el-table-column>
                 <el-table-column :label="variable_name4 + '详情'"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'FINISH_SPLIT_ADMIN' " @click="see_but(scope.row)"><i class="el-icon-view el-icon--right"></i></span>
                        <span v-else-if="scope.row.type == 'FINISH_SPLIT_AND_KMB_ADMIN' " @click="see_but(scope.row)"><i class="el-icon-view el-icon--right"></i></span>
                        <span v-else >暂无信息</span>
                    </template>
                </el-table-column>
                 <el-table-column label="状态"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'RECOVERY_GOODS' ">恢复持有</span>
                        <span v-if="scope.row.type == 'EXCHANGE_KMB' ">兑换{{ variable_name1 }}</span>
                        <span v-if="scope.row.type == 'DELIVERY_GOODS' "> 进行收货</span>
                        <span v-if="scope.row.type == 'FINISH_SPLIT_ADMIN' ">拆分{{ variable_name4 }}</span>
                        <span v-if="scope.row.type == 'FINISH_SPLIT_AND_KMB_ADMIN' ">拆分{{ variable_name4 }}和{{ variable_name1 }}</span>
                    </template>
                </el-table-column>

            </el-table>  

        <!-- 土地详情 -->
        <el-dialog :title="variable_name4 + '详情'" :visible.sync="mtk_table"  width="700px">
            <div style="width:100%;"> 

             <el-table :data="mtk_table_form.datalist" style="width: 100%" height="500px" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">
                
                 <el-table-column :label="variable_name4 + '编号'"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.pid }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="价格"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.price }}</span>
                    </template>
                </el-table-column>
            </el-table> 
            </div> 
        </el-dialog>

   </div>
</template>

<script>

export default {
   name: 'alldetailsListlist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
        my_id:'',
        mtk_table:false,
        mtk_table_form:{
            datalist:[]
        },
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 253
  
  },
  mounted (){
    
  },
  methods: {
       see_but(row){ 
            this.my_id = row.id
            this.mtk_table = true
            this.mtk_table_fun()
       },
       mtk_table_fun(){
           this.mtk_table_form.datalist = []
           this.post("/Statistics/splitGoodsList", {
              id:this.my_id
	        }).then(res => {
            // this.count = res.result.count
             this.mtk_table_form.datalist = res.result
            //console.log(res.result,"6666")
         })
     },
  }
}
</script>


<style scoped>

</style>